<template>
  <div class="main-wrapper">
    <el-container>

      <el-aside width="200px">

        <div class="aside-title">
          <img src="../../assets/logo.png" height="20" width="20"/>
          <span>CRM后台管理系统</span>
        </div>

        <el-scrollbar>
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          router>
          <el-menu-item index="0">
            <i class="el-icon-setting"></i>
            <span slot="title">系统管理</span>
          </el-menu-item>

          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>基础数据</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="/main/good">
                <i class="el-icon-setting"></i>
                <span slot="title">商品管理</span>
              </el-menu-item>
              <el-menu-item index="/main/category">
                <i class="el-icon-setting"></i>
                <span slot="title">分类管理</span>
              </el-menu-item>
              <el-menu-item index="/main/customer">
                <i class="el-icon-setting"></i>
                <span slot="title">客户管理</span>
              </el-menu-item>
              <el-menu-item index="/main/supplier">
                <i class="el-icon-setting"></i>
                <span slot="title">运营商管理</span>
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>

          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>基础数据</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="1-1">
                <i class="el-icon-setting"></i>
                <span slot="title">商品管理</span>
              </el-menu-item>
              <el-menu-item index="1-2">
                <i class="el-icon-setting"></i>
                <span slot="title">分类管理</span>
              </el-menu-item>
              <el-menu-item index="1-3">
                <i class="el-icon-setting"></i>
                <span slot="title">客户管理</span>
              </el-menu-item>
              <el-menu-item index="1-4">
                <i class="el-icon-setting"></i>
                <span slot="title">运营商管理</span>
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-location"></i>
              <span>基础数据</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="1-1">
                <i class="el-icon-setting"></i>
                <span slot="title">商品管理</span>
              </el-menu-item>
              <el-menu-item index="1-2">
                <i class="el-icon-setting"></i>
                <span slot="title">分类管理</span>
              </el-menu-item>
              <el-menu-item index="1-3">
                <i class="el-icon-setting"></i>
                <span slot="title">客户管理</span>
              </el-menu-item>
              <el-menu-item index="1-4">
                <i class="el-icon-setting"></i>
                <span slot="title">运营商管理</span>
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
        </el-scrollbar>

      </el-aside>

      <el-container>
        <el-header>Header</el-header>
        <el-main>
          <div class="main-box">
            <router-view/>
          </div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>

</script>

<style scoped lang="scss">
  .main-wrapper {
    height: 100%;

  }

  .el-header {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }

  .el-aside {
    color: #333;
    .el-scrollbar{
      height: calc(100% - 60px);
      .el-menu {

      }
    }

    .aside-title {
      height: 60px;
      line-height: 60px;
      background-color: antiquewhite;
      img {
        vertical-align: center;
        margin-right: 6px;

      }
      span {
        color: black;
        font-size: 18px;
        font-weight: 700;
      }
    }
  }

  .el-main {
    background-color: #E9EEF3;
    color: #333;
    padding: 10px;
    .main-box{
      width: 100%;
      padding: 20px;
      background-color: white;
      box-sizing: border-box;
    }
  }

  .el-container {
    height: 100%;
    width: 100%;
  }

</style>
